\hypertarget{kernel_8h}{\section{\-C\-:/opensource/dst2-\/projekt/src/kernel.h \-File \-Reference}
\label{kernel_8h}\index{\-C\-:/opensource/dst2-\/projekt/src/kernel.\-h@{\-C\-:/opensource/dst2-\/projekt/src/kernel.\-h}}
}
{\ttfamily \#include $<$stdlib.\-h$>$}\*
\subsection*{\-Data \-Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{struct___t_c_b}{\-\_\-\-T\-C\-B}
\item 
struct \hyperlink{structmsgobj}{msgobj}
\item 
struct \hyperlink{structmailbox}{mailbox}
\item 
struct \hyperlink{structl__obj}{l\-\_\-obj}
\item 
struct \hyperlink{struct__list}{\-\_\-list}
\end{DoxyCompactItemize}
\subsection*{\-Defines}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{kernel_8h_a1c5c9d4bb3418209e1fa76041b9d2189}{\-C\-O\-N\-T\-E\-X\-T\-\_\-\-S\-I\-Z\-E}~13
\item 
\hypertarget{kernel_8h_a6423a880df59733d2d9b509c7718d3a9}{\#define {\bfseries \-S\-T\-A\-C\-K\-\_\-\-S\-I\-Z\-E}~100}\label{kernel_8h_a6423a880df59733d2d9b509c7718d3a9}

\item 
\hypertarget{kernel_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{\#define {\bfseries \-T\-R\-U\-E}~1}\label{kernel_8h_aa8cecfc5c5c054d2875c03e77b7be15d}

\item 
\hypertarget{kernel_8h_aa93f0eb578d23995850d61f7d61c55c1}{\#define {\bfseries \-F\-A\-L\-S\-E}~!\-T\-R\-U\-E}\label{kernel_8h_aa93f0eb578d23995850d61f7d61c55c1}

\item 
\hypertarget{kernel_8h_a6fb7181d994ee98e735494be55809708}{\#define {\bfseries \-R\-U\-N\-N\-I\-N\-G}~1}\label{kernel_8h_a6fb7181d994ee98e735494be55809708}

\item 
\hypertarget{kernel_8h_ab5889105dcd019008c9448dff61323f6}{\#define {\bfseries \-I\-N\-I\-T}~!\-R\-U\-N\-N\-I\-N\-G}\label{kernel_8h_ab5889105dcd019008c9448dff61323f6}

\item 
\hypertarget{kernel_8h_abb508ea8227673f419e9fe3a86c30d8e}{\#define {\bfseries \-F\-A\-I\-L}~0}\label{kernel_8h_abb508ea8227673f419e9fe3a86c30d8e}

\item 
\hypertarget{kernel_8h_aa90cac659d18e8ef6294c7ae337f6b58}{\#define {\bfseries \-S\-U\-C\-C\-E\-S\-S}~1}\label{kernel_8h_aa90cac659d18e8ef6294c7ae337f6b58}

\item 
\hypertarget{kernel_8h_aba51915c87d64af47fb1cc59348961c9}{\#define {\bfseries \-O\-K}~1}\label{kernel_8h_aba51915c87d64af47fb1cc59348961c9}

\item 
\hypertarget{kernel_8h_ad91d8e17ee29c318bd27faeea0b3598a}{\#define {\bfseries \-D\-E\-A\-D\-L\-I\-N\-E\-\_\-\-R\-E\-A\-C\-H\-E\-D}~0}\label{kernel_8h_ad91d8e17ee29c318bd27faeea0b3598a}

\item 
\hypertarget{kernel_8h_ad0c31336be193c6ea8a2e4cc55183bb1}{\#define {\bfseries \-N\-O\-T\-\_\-\-E\-M\-P\-T\-Y}~0}\label{kernel_8h_ad0c31336be193c6ea8a2e4cc55183bb1}

\item 
\hypertarget{kernel_8h_afe3a5d0081166bd5e1d8c9ea00db83e5}{\#define {\bfseries \-S\-E\-N\-D\-E\-R}~+1}\label{kernel_8h_afe3a5d0081166bd5e1d8c9ea00db83e5}

\item 
\hypertarget{kernel_8h_a455948b8bd5f5ce920899ae1013c4b4c}{\#define {\bfseries \-R\-E\-C\-E\-I\-V\-E\-R}~-\/1}\label{kernel_8h_a455948b8bd5f5ce920899ae1013c4b4c}

\end{DoxyCompactItemize}
\subsection*{\-Typedefs}
\begin{DoxyCompactItemize}
\item 
\hypertarget{kernel_8h_ad086a068816d5cbf9ef1f2e77476c069}{typedef int {\bfseries exception}}\label{kernel_8h_ad086a068816d5cbf9ef1f2e77476c069}

\item 
\hypertarget{kernel_8h_a1062901a7428fdd9c7f180f5e01ea056}{typedef int {\bfseries bool}}\label{kernel_8h_a1062901a7428fdd9c7f180f5e01ea056}

\item 
\hypertarget{kernel_8h_a91ad9478d81a7aaf2593e8d9c3d06a14}{typedef unsigned int {\bfseries uint}}\label{kernel_8h_a91ad9478d81a7aaf2593e8d9c3d06a14}

\item 
\hypertarget{kernel_8h_aa91f46f0fcdf7975411ebb878fd2a05d}{typedef int {\bfseries action}}\label{kernel_8h_aa91f46f0fcdf7975411ebb878fd2a05d}

\item 
typedef struct \hyperlink{struct___t_c_b}{\-\_\-\-T\-C\-B} \hyperlink{kernel_8h_a0c24950e4a367e32a373235c34739781}{\-T\-C\-B}
\item 
\hypertarget{kernel_8h_a965c7992c50a9445b5e430dd8e18267f}{typedef struct \hyperlink{structmsgobj}{msgobj} {\bfseries msg}}\label{kernel_8h_a965c7992c50a9445b5e430dd8e18267f}

\item 
\hypertarget{kernel_8h_aa165e1366825a47787db6ff584a32770}{typedef struct \hyperlink{structl__obj}{l\-\_\-obj} {\bfseries listobj}}\label{kernel_8h_aa165e1366825a47787db6ff584a32770}

\item 
\hypertarget{kernel_8h_ac8c8d86985b0bf4a1279d23c29b38eba}{typedef struct \hyperlink{struct__list}{\-\_\-list} {\bfseries list}}\label{kernel_8h_ac8c8d86985b0bf4a1279d23c29b38eba}

\end{DoxyCompactItemize}
\subsection*{\-Functions}
\begin{DoxyCompactItemize}
\item 
int \hyperlink{kernel_8h_aad80019951ae95cf5df515d6d0ad1e93}{init\-\_\-kernel} (void)
\item 
exception \hyperlink{kernel_8h_a42bfc62243f10c46ceee0712571ed02e}{create\-\_\-task} (void($\ast$body)(), uint \hyperlink{kernel_8h_a415bfbeeec9b4d8eabe0fa37ffd512fa}{deadline})
\item 
void \hyperlink{kernel_8h_a5354b26c0e92bc241bbaf8daedc5a28c}{terminate} (void)
\item 
void \hyperlink{kernel_8h_a05e0ffe612d44e6d7f3a9ae5b9df56a2}{run} (void)
\item 
\hyperlink{structmailbox}{mailbox} $\ast$ \hyperlink{kernel_8h_a28699cab35eb5ea1e91a4e7c1c6b83db}{create\-\_\-mailbox} (int nof\-\_\-msg, int size\-\_\-of\-\_\-msg)
\item 
\hypertarget{kernel_8h_adf1a9f71dea7a3adc2f3787080bfab9c}{int {\bfseries no\-\_\-messages} (\hyperlink{structmailbox}{mailbox} $\ast$m\-Box)}\label{kernel_8h_adf1a9f71dea7a3adc2f3787080bfab9c}

\item 
exception \hyperlink{kernel_8h_a4b1dea31825f9001a59a30454ea4da92}{send\-\_\-wait} (\hyperlink{structmailbox}{mailbox} $\ast$m\-Box, void $\ast$p\-Data)
\item 
exception \hyperlink{kernel_8h_abd6f30918419645edbd5c37e4436ee8d}{receive\-\_\-wait} (\hyperlink{structmailbox}{mailbox} $\ast$m\-Box, void $\ast$p\-Data)
\item 
exception \hyperlink{kernel_8h_a6a564f8696b23cb7392d26ccf028b81e}{send\-\_\-no\-\_\-wait} (\hyperlink{structmailbox}{mailbox} $\ast$m\-Box, void $\ast$p\-Data)
\item 
int \hyperlink{kernel_8h_a712e1920162e49aa4597afe3a066057a}{receive\-\_\-no\-\_\-wait} (\hyperlink{structmailbox}{mailbox} $\ast$m\-Box, void $\ast$p\-Data)
\item 
exception \hyperlink{kernel_8h_ae600d2a164441d7ca5200fe978253a15}{wait} (uint n\-Ticks)
\item 
void \hyperlink{kernel_8h_a8c4a8800ec94acdc9e79f493e175bbba}{set\-\_\-ticks} (uint no\-\_\-of\-\_\-ticks)
\item 
uint \hyperlink{kernel_8h_ac8ec696caa3fec38a393173591ab4cac}{ticks} (void)
\item 
uint \hyperlink{kernel_8h_a415bfbeeec9b4d8eabe0fa37ffd512fa}{deadline} (void)
\item 
void \hyperlink{kernel_8h_add8b1bafb2b27062dba1e95c376130de}{set\-\_\-deadline} (uint n\-New)
\item 
\hypertarget{kernel_8h_ac7f665a7995253fc167496bdfd4f0677}{void {\bfseries isr\-\_\-off} (void)}\label{kernel_8h_ac7f665a7995253fc167496bdfd4f0677}

\item 
\hypertarget{kernel_8h_a83e26da1090464d1ad80a32408120aa1}{void {\bfseries isr\-\_\-on} (void)}\label{kernel_8h_a83e26da1090464d1ad80a32408120aa1}

\item 
\hypertarget{kernel_8h_ae0d92bc921159bfdd8cf24eb7d208319}{void {\bfseries \-Save\-Context} (void)}\label{kernel_8h_ae0d92bc921159bfdd8cf24eb7d208319}

\item 
\hypertarget{kernel_8h_a2649dd366ca39609085f3bec1b5d7cbc}{void {\bfseries \-Load\-Context} (void)}\label{kernel_8h_a2649dd366ca39609085f3bec1b5d7cbc}

\end{DoxyCompactItemize}


\subsection{\-Detailed \-Description}
\-This file contains most of the typedefinitions and structs. \-It also contains some global variables and definitions. 

\subsection{\-Define \-Documentation}
\hypertarget{kernel_8h_a1c5c9d4bb3418209e1fa76041b9d2189}{\index{kernel.\-h@{kernel.\-h}!\-C\-O\-N\-T\-E\-X\-T\-\_\-\-S\-I\-Z\-E@{\-C\-O\-N\-T\-E\-X\-T\-\_\-\-S\-I\-Z\-E}}
\index{\-C\-O\-N\-T\-E\-X\-T\-\_\-\-S\-I\-Z\-E@{\-C\-O\-N\-T\-E\-X\-T\-\_\-\-S\-I\-Z\-E}!kernel.h@{kernel.\-h}}
\subsubsection[{\-C\-O\-N\-T\-E\-X\-T\-\_\-\-S\-I\-Z\-E}]{\setlength{\rightskip}{0pt plus 5cm}\#define {\bf \-C\-O\-N\-T\-E\-X\-T\-\_\-\-S\-I\-Z\-E}~13}}\label{kernel_8h_a1c5c9d4bb3418209e1fa76041b9d2189}
\-Global variabels and definitions 

\subsection{\-Typedef \-Documentation}
\hypertarget{kernel_8h_a0c24950e4a367e32a373235c34739781}{\index{kernel.\-h@{kernel.\-h}!\-T\-C\-B@{\-T\-C\-B}}
\index{\-T\-C\-B@{\-T\-C\-B}!kernel.h@{kernel.\-h}}
\subsubsection[{\-T\-C\-B}]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf \-\_\-\-T\-C\-B}  {\bf \-T\-C\-B}}}\label{kernel_8h_a0c24950e4a367e32a373235c34739781}
\-Task \-Control \-Block contains the neccessary tools for handling a task. 

\subsection{\-Function \-Documentation}
\hypertarget{kernel_8h_a28699cab35eb5ea1e91a4e7c1c6b83db}{\index{kernel.\-h@{kernel.\-h}!create\-\_\-mailbox@{create\-\_\-mailbox}}
\index{create\-\_\-mailbox@{create\-\_\-mailbox}!kernel.h@{kernel.\-h}}
\subsubsection[{create\-\_\-mailbox}]{\setlength{\rightskip}{0pt plus 5cm}{\bf mailbox}$\ast$ {\bf create\-\_\-mailbox} (
\begin{DoxyParamCaption}
\item[{int}]{nof\-\_\-msg, }
\item[{int}]{size\-\_\-of\-\_\-msg}
\end{DoxyParamCaption}
)}}\label{kernel_8h_a28699cab35eb5ea1e91a4e7c1c6b83db}
\-Creates a new mailbox \hypertarget{kernel_8h_a42bfc62243f10c46ceee0712571ed02e}{\index{kernel.\-h@{kernel.\-h}!create\-\_\-task@{create\-\_\-task}}
\index{create\-\_\-task@{create\-\_\-task}!kernel.h@{kernel.\-h}}
\subsubsection[{create\-\_\-task}]{\setlength{\rightskip}{0pt plus 5cm}exception {\bf create\-\_\-task} (
\begin{DoxyParamCaption}
\item[{void($\ast$)()}]{task\-\_\-body, }
\item[{uint}]{deadline}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}final\mbox{]}}}}\label{kernel_8h_a42bfc62243f10c46ceee0712571ed02e}
\-This function creates a task. \-If the call is made in startup mode, i.\-e. the kernel is not running, only the necessary data structures will be created. \-However, if the call is made in running mode, it will lead to a rescheduling and possibly a context switch. \-Argument 
\begin{DoxyParams}{\-Parameters}
{\em $\ast$task\-\_\-body} & \-A pointer to the \-C function holding the code of the task. \\
\hline
{\em deadline} & \-The kernel will try to schedule the task so it will meet this deadline. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{\-Returns}
\-Description of the functions status, i.\-e. \-F\-A\-I\-L/\-O\-K. 
\end{DoxyReturn}
\begin{DoxyRefDesc}{\-Todo}
\item[\hyperlink{todo__todo000003}{\-Todo}]disable interupts \end{DoxyRefDesc}
\hypertarget{kernel_8h_a415bfbeeec9b4d8eabe0fa37ffd512fa}{\index{kernel.\-h@{kernel.\-h}!deadline@{deadline}}
\index{deadline@{deadline}!kernel.h@{kernel.\-h}}
\subsubsection[{deadline}]{\setlength{\rightskip}{0pt plus 5cm}uint {\bf deadline} (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{kernel_8h_a415bfbeeec9b4d8eabe0fa37ffd512fa}
\-This call will return the deadline of the specified task \hypertarget{kernel_8h_aad80019951ae95cf5df515d6d0ad1e93}{\index{kernel.\-h@{kernel.\-h}!init\-\_\-kernel@{init\-\_\-kernel}}
\index{init\-\_\-kernel@{init\-\_\-kernel}!kernel.h@{kernel.\-h}}
\subsubsection[{init\-\_\-kernel}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf init\-\_\-kernel} (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}final\mbox{]}}}}\label{kernel_8h_aad80019951ae95cf5df515d6d0ad1e93}
exception \hyperlink{kernel_8h_aad80019951ae95cf5df515d6d0ad1e93}{init\-\_\-kernel()} \-This function initializes the kernel and its data structures and leaves the kernel in start-\/up mode. \-The init\-\_\-kernel call must be made before any other call is made to the kernel. \begin{DoxyReturn}{\-Returns}
parameter 
\end{DoxyReturn}
\begin{DoxyRefDesc}{\-Todo}
\item[\hyperlink{todo__todo000002}{\-Todo}]\-Set tick counter to zero \end{DoxyRefDesc}
\hypertarget{kernel_8h_a712e1920162e49aa4597afe3a066057a}{\index{kernel.\-h@{kernel.\-h}!receive\-\_\-no\-\_\-wait@{receive\-\_\-no\-\_\-wait}}
\index{receive\-\_\-no\-\_\-wait@{receive\-\_\-no\-\_\-wait}!kernel.h@{kernel.\-h}}
\subsubsection[{receive\-\_\-no\-\_\-wait}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf receive\-\_\-no\-\_\-wait} (
\begin{DoxyParamCaption}
\item[{{\bf mailbox} $\ast$}]{m\-Box, }
\item[{void $\ast$}]{\-Data}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}final\mbox{]}}}}\label{kernel_8h_a712e1920162e49aa4597afe3a066057a}
\-This call will attempt to receive a \-Message from the specified \-Mailbox. \-The calling task will continue execution after the call. \-When there is no send \-Message available, or if the \-Mailbox is empty, the function will return \-F\-A\-I\-L. \-Otherwise, \-O\-K is returned. \-The call might imply a new scheduling and possibly a context switch. \hypertarget{kernel_8h_abd6f30918419645edbd5c37e4436ee8d}{\index{kernel.\-h@{kernel.\-h}!receive\-\_\-wait@{receive\-\_\-wait}}
\index{receive\-\_\-wait@{receive\-\_\-wait}!kernel.h@{kernel.\-h}}
\subsubsection[{receive\-\_\-wait}]{\setlength{\rightskip}{0pt plus 5cm}exception {\bf receive\-\_\-wait} (
\begin{DoxyParamCaption}
\item[{{\bf mailbox} $\ast$}]{m\-Box, }
\item[{void $\ast$}]{\-Data}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}final\mbox{]}}}}\label{kernel_8h_abd6f30918419645edbd5c37e4436ee8d}
\-This call will attempt to receive a \-Message from the specified \-Mailbox. \-If there is a send\-\_\-wait or a send\-\_\-no\-\_\-wait \-Message waiting for a receive\-\_\-wait or a receive\-\_\-no\-\_\-wait \-Message on the specified \-Mailbox, receive\-\_\-wait will collect it. \-If the \-Message was of send\-\_\-wait type the sending task will be moved to the \-Readylist. \-Otherwise, if there is not a send \-Message (of either type) waiting on the specified \-Mailbox, the receiving task will be blocked. \-In both cases (blocked or not blocked) a new task schedule is done and possibly a context switch. \-During the blocking period of the task its deadline might be reached. \-At that point in time the blocked task will be resumed with the exception\-: \-D\-E\-A\-D\-L\-I\-N\-E\-\_\-\-R\-E\-A\-C\-H\-E\-D. \hypertarget{kernel_8h_a05e0ffe612d44e6d7f3a9ae5b9df56a2}{\index{kernel.\-h@{kernel.\-h}!run@{run}}
\index{run@{run}!kernel.h@{kernel.\-h}}
\subsubsection[{run}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf run} (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{kernel_8h_a05e0ffe612d44e6d7f3a9ae5b9df56a2}
\-This function starts the kernel and thus the system of created tasks. \-Since the call will start the kernel it will leave control to the task with tightest deadline. \-Therefore, it must be placed last in the application initialization code. \-After this call the system will be in running mode. \hypertarget{kernel_8h_a6a564f8696b23cb7392d26ccf028b81e}{\index{kernel.\-h@{kernel.\-h}!send\-\_\-no\-\_\-wait@{send\-\_\-no\-\_\-wait}}
\index{send\-\_\-no\-\_\-wait@{send\-\_\-no\-\_\-wait}!kernel.h@{kernel.\-h}}
\subsubsection[{send\-\_\-no\-\_\-wait}]{\setlength{\rightskip}{0pt plus 5cm}exception {\bf send\-\_\-no\-\_\-wait} (
\begin{DoxyParamCaption}
\item[{{\bf mailbox} $\ast$}]{m\-Box, }
\item[{void $\ast$}]{\-Data}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}final\mbox{]}}}}\label{kernel_8h_a6a564f8696b23cb7392d26ccf028b81e}
\-This call will send a \-Message to the specified \-Mailbox. \-The sending task will continue execution after the call. \-When the \-Mailbox is full, the oldest \-Message will be overwritten. \-The send\-\_\-no\-\_\-wait call will imply a new scheduling and possibly a context switch. \-Note\-: send\-\_\-wait and send\-\_\-no\-\_\-wait \-Messages shall not be mixed in the same \-Mailbox. \hypertarget{kernel_8h_a4b1dea31825f9001a59a30454ea4da92}{\index{kernel.\-h@{kernel.\-h}!send\-\_\-wait@{send\-\_\-wait}}
\index{send\-\_\-wait@{send\-\_\-wait}!kernel.h@{kernel.\-h}}
\subsubsection[{send\-\_\-wait}]{\setlength{\rightskip}{0pt plus 5cm}exception {\bf send\-\_\-wait} (
\begin{DoxyParamCaption}
\item[{{\bf mailbox} $\ast$}]{m\-Box, }
\item[{void $\ast$}]{\-Data}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}final\mbox{]}}}}\label{kernel_8h_a4b1dea31825f9001a59a30454ea4da92}
\-This call will send a \-Message to the specified \-Mailbox. \-If there is a receiving task waiting for a \-Message on the specified \-Mailbox, send\-\_\-wait will deliver it and the receiving task will be moved to the \-Readylist. \-Otherwise, if there is not a receiving task waiting for a \-Message on the specified \-Mailbox, the sending task will be blocked. \-In both cases (blocked or not blocked) a new task schedule is done and possibly a context switch. \-During the blocking period of the task its deadline might be reached. \-At that point in time the blocked task will be resumed with the exception\-: \-D\-E\-A\-D\-L\-I\-N\-E\-\_\-\-R\-E\-A\-C\-H\-E\-D. \-Note\-: send\-\_\-wait and send\-\_\-no\-\_\-wait \-Messages shall not be mixed in the same \-Mailbox. \hypertarget{kernel_8h_add8b1bafb2b27062dba1e95c376130de}{\index{kernel.\-h@{kernel.\-h}!set\-\_\-deadline@{set\-\_\-deadline}}
\index{set\-\_\-deadline@{set\-\_\-deadline}!kernel.h@{kernel.\-h}}
\subsubsection[{set\-\_\-deadline}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf set\-\_\-deadline} (
\begin{DoxyParamCaption}
\item[{uint}]{deadline}
\end{DoxyParamCaption}
)}}\label{kernel_8h_add8b1bafb2b27062dba1e95c376130de}
\-This call will set the deadline for the calling task. \-The task will be rescheduled and a context switch might occur. \begin{DoxyRefDesc}{\-Todo}
\item[\hyperlink{todo__todo000004}{\-Todo}]disable interupts \end{DoxyRefDesc}


\begin{DoxyRefDesc}{\-Todo}
\item[\hyperlink{todo__todo000005}{\-Todo}]\-I\-F first execution \-T\-H\-E\-N \-Set\-: ?not first execution any more? \-Set the deadline field in the calling \-T\-C\-B. \-Reschedule \-Readylist \-Load context \-E\-N\-D\-I\-F \end{DoxyRefDesc}
\hypertarget{kernel_8h_a8c4a8800ec94acdc9e79f493e175bbba}{\index{kernel.\-h@{kernel.\-h}!set\-\_\-ticks@{set\-\_\-ticks}}
\index{set\-\_\-ticks@{set\-\_\-ticks}!kernel.h@{kernel.\-h}}
\subsubsection[{set\-\_\-ticks}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf set\-\_\-ticks} (
\begin{DoxyParamCaption}
\item[{uint}]{n\-Ticks}
\end{DoxyParamCaption}
)}}\label{kernel_8h_a8c4a8800ec94acdc9e79f493e175bbba}
\-This call will set the tick counter to the given value. \hypertarget{kernel_8h_a5354b26c0e92bc241bbaf8daedc5a28c}{\index{kernel.\-h@{kernel.\-h}!terminate@{terminate}}
\index{terminate@{terminate}!kernel.h@{kernel.\-h}}
\subsubsection[{terminate}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf terminate} (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{kernel_8h_a5354b26c0e92bc241bbaf8daedc5a28c}
\-This call will terminate the running task. \-All data structures for the task will be removed. \-Thereafter, another task will be scheduled for execution. \hypertarget{kernel_8h_ac8ec696caa3fec38a393173591ab4cac}{\index{kernel.\-h@{kernel.\-h}!ticks@{ticks}}
\index{ticks@{ticks}!kernel.h@{kernel.\-h}}
\subsubsection[{ticks}]{\setlength{\rightskip}{0pt plus 5cm}uint {\bf ticks} (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{kernel_8h_ac8ec696caa3fec38a393173591ab4cac}
\-This call will return the current value of the tick counter \hypertarget{kernel_8h_ae600d2a164441d7ca5200fe978253a15}{\index{kernel.\-h@{kernel.\-h}!wait@{wait}}
\index{wait@{wait}!kernel.h@{kernel.\-h}}
\subsubsection[{wait}]{\setlength{\rightskip}{0pt plus 5cm}exception {\bf wait} (
\begin{DoxyParamCaption}
\item[{uint}]{n\-Ticks}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}final\mbox{]}}}}\label{kernel_8h_ae600d2a164441d7ca5200fe978253a15}
\-This call will block the calling task until the given number of ticks has expired. 